Some image capture devices use phase difference detection sensors (which may also be referred to as “pixels”) to perform autofocus. On-sensor phase difference detection works by interspersing phase difference detection pixels between imaging pixels, typically arranged in repeating sparse patterns of left and right pixels. The system detects phase differences between signals generated by different phase difference detection pixels, for example between an image generated from left pixel data and an image generated from right pixel data. The detected phase differences can be used to perform autofocus.
Phase detection autofocus operates faster than contrast-based autofocus. Many current implementations place a metal mask over the image sensor to create left and right phase detection pixels, resulting in less light reaching the masked pixels. Because the output of phase detection pixels has lower brightness than the output of normal image capturing pixels, the phase difference detection pixels create noticeable artifacts in captured images that require correction. By placing the phase detection pixels individually amidst imaging pixels, the system can interpolate values for the phase detection pixels.
Masked pixels are used in pairs. When the scene is out of focus, the phase detection pixel mask phase shifts the incoming light slightly. The distance between phase detection pixels, combined with their relative shifts, can be convolved to give a determination of roughly how far the optical assembly needs to move the lens to bring the scene into focus.